package com.design.mode.responsibility;

import org.junit.jupiter.api.Test;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-04-06 14:39:18
 */
public class ResponsibilityTest {

    @Test
    public void test1() {
        Request request = new Request(1,1,2000);

        AApproved a = new AApproved("A");
        BApproved b = new BApproved("B");
        CApproved c = new CApproved("C");

        a.setApproved(b);
        b.setApproved(c);

        a.process(request);
        System.out.println("a.next.sum() = " + a.next.sum());
    }
}
